package com.share.domain;

import lombok.Data;

@Data
public class DistanceResult {
    private Double distance;//距离
    private Integer duration;//消耗时间

    public DistanceResult of(){
        //距离换算成千米
        this.setDistance(this.getDistance()/1000.0);
        //时长换算成分钟
        this.setDuration(this.getDuration()/60);
        return this;
    }
}
